

package com.team1160.scouting.elements;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.FlowLayout;
import javax.swing.BoxLayout;
import javax.swing.JPanel;

/**
 * abstract superclass for all xml-generated elements in the app.
 * @author Saketh Kasibatla
 */
public abstract class ScoutingElement extends JPanel{
    
    /**
     * whether or not the element is weighted
     */
    public boolean isWeighted;

    protected FlowLayout layout;

    /**
     * default superconstructor for all scouting elements
     */
    public ScoutingElement(){
        this.setAlignmentX(Component.LEFT_ALIGNMENT);
        layout=new FlowLayout();
        this.setLayout(layout);
        layout.setAlignment(FlowLayout.LEFT);
    }

    /**
     * gets the input value of the element
     * @return the string value of the input
     */
    public abstract String getInput();

    /**
     * gets the name of the element
     * @return the string name of the element
     */
    public abstract String getText();
    
    /**
     * resets the element to its default state
     */
    public abstract void clear();
}
